ioemu: Avoid struct members clashing with POSIX apis
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 28 Aug 2007 15:13:35 +0000 (16:13 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 28 Aug 2007 15:13:35 +0000 (16:13 +0100)
commit72885c0fa30cc3da6951801f323775f08b1043ff
tree2fdcbc87733914d30f75e8f193eb6b6d620a3510
parent40f18cbcf0740bde81f6e9ed7f6ac82677d5e057
ioemu: Avoid struct members clashing with POSIX apis

The TPM code in tools/ioemu/hw/tpm_tis.c has a struct containing a
number of function pointers with names open, close, read, write which
are the same as various POSIX apis already #included in the
file. POSIX allows these functions to be defined as macros and latest
GCC/glibc does indeed define them as macros depending on compiler
flags. This causes compile errors when deferencing the struct
members. The solution is either to change calls like   ctx->open () to
be (* ctx->open) (), or simply to rename the struct members. Since
this struct was only used inside that one file I simply renamed them.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/ioemu/hw/tpm_tis.c